
interface IConvert {
    Convert(temperature: number): number; // Array of bytes
}


class FahrenheitToCelsius implements IConvert {
    Convert(temperature: number): number {
        return ((temperature - 32) * 5) / 9;
    }
}

class CelsiusToFahrenheit implements IConvert {
    Convert(temperature: number): number {
        return (temperature * 9) / 5 + 32;
    }
}

function TPConvert<T extends IConvert>(convert: T, temperature: number) {
    console.log(convert.Convert(temperature));
}

TPConvert(new FahrenheitToCelsius(), 100)

TPConvert(new CelsiusToFahrenheit(), 13)